package com.company;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {

        test();
    }
    public  static void test() {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一组数字：");
        int num = scanner.nextInt();
        int sum = 0;
        while (num>0){
            int d= num%10;
            num = num/10;
            //将单个数字输出*10以数字连起来输出
            sum = sum*10+d;
        }
        System.out.println("倒序输出的数字为："+sum);
    }
}
